package com.easylinkin.linkappapi.circuit.dto;

/**
 * 告警类型枚举对应
 * rail_give_alarm_type_config表
 */
public enum RailGiveAlarmTypeConfigEnum {
    /**
     * 剩余电流过高告警
     */
    AlarmType_1("1","3", "剩余电流过高告警", "residual_current"),
    /**
     * 温度过高告警
     */
    AlarmType_2("2","3", "温度过高告警", "temperature_1,temperature_2,temperature_3,temperature_4"),
    /**
     * 供电中断告警
     */
    AlarmType_3("3","3", "供电中断告警", "power_interrupt"),
    /**
     * 电压/电流逆向序告警
     */
    AlarmType_4("4","3", "电压/电流逆向序告警", "voltage_reverse,current_reverse"),
    /**
     * A/B/C相告警
     * phase_over_load:过载
     * phase_loss_phase:缺相
     * phase_under_voltage:欠压
     * phase_over_voltage:过压
     */
    AlarmType_5("5","3", "A/B/C相告警", "a_phase_over_load,b_phase_over_load,c_phase_over_load,a_phase_loss_phase,b_phase_loss_phase,c_phase_loss_phase,a_phase_under_voltage,b_phase_under_voltage,c_phase_under_voltage,a_phase_over_voltage,b_phase_over_voltage,c_phase_over_voltage"),
    /**
     * 断路器故障
     */
    AlarmType_6("6","3", "断路器故障", null),
    //-- 设备离线告警 7    null
    AlarmType_7("7","1", "设备离线告警", null),
    //-- 风速告警 8 wind_speed
    AlarmType_8("8","1", "风速告警", "wind_speed"),
    //-- 俯仰角告警 9 pitch
    AlarmType_9("9","1", "俯仰角告警", "pitch"),
    //-- 力矩告警 10 moment
    AlarmType_10("10","1", "力矩告警", "moment"),
    //-- 主钩吊重告警 11 weight
    AlarmType_11("11","1", "主钩吊重告警", "weight"),
    //-- 大臂长度告警 12 big_arm_len
    AlarmType_12("12","1", "大臂长度告警", "big_arm_len"),
    //-- 水平度X告警 13 level_x
    AlarmType_13("13","1", "水平度X告警", "level_x"),
    //-- 水平度Y告警 14 level_y
    AlarmType_14("14","1", "水平度Y告警", "level_y"),
    //-- 回转告警 15 rotation
    AlarmType_15("15","1", "回转告警", "rotation"),
    //-- 力臂告警 16 arm_force
    AlarmType_16("16","1", "力臂告警", "arm_force"),
    //-- 安全限界告警 17 safe_limit
    AlarmType_17("17","1", "安全限界告警", "safe_limit"),
    //-- 作业展臂最不利工况可起重吊重告警 18 weight
    AlarmType_18("18","1", "作业展臂最不利工况可起重吊重告警", "weight"),
    //-- 最大臂长告警 19 big_arm_len
    AlarmType_19("19","1", "最大臂长告警", "big_arm_len"),
    //-- 倾倒告警 20 inclination
    AlarmType_20("20","1", "倾倒告警", "inclination"),
    //-- 施工防侵限告警 21 null
    AlarmType_21("21","1", "施工防侵限告警", null),
    //-- 防倾倒侵限告警 22 null
    AlarmType_22("22","1", "防倾倒侵限告警", null),
    //-- 离开作业区域告警 23 null
    AlarmType_23("23","1", "离开作业区域告警", null),
    /**
     * ai安防
     */
    //-- 有人跌倒 24
    AlarmType_24("24","5", "有人跌倒",  "ruleType"),
    //-- 烟火 25
    AlarmType_25("25","5", "烟火", "ruleType"),
    // -- 举手求救 26
    AlarmType_26("26","5", "举手求救", "ruleType"),
    // -- 外来人员入侵 27
    AlarmType_27("27","5", "外来人员入侵", "ruleType"),
    // --  区域入侵 28
    AlarmType_28("28","5", "区域入侵", "ruleType"),
    // --  区域入侵 29
    AlarmType_29("29","5", "未穿反光衣", "ruleType"),
    // --  区域入侵 30
    AlarmType_30("30","5", "未系安全带", "ruleType"),
    // --  未戴安全帽 31
    AlarmType_31("31","5", "未戴安全帽", "ruleType"),
    // --  吸烟 32
    AlarmType_32("32","5", "吸烟", "ruleType"),
    // --  打架 33
    AlarmType_33("33","5", "打架", "ruleType");

    /**
     * 告警类型id 唯一标识
     */
    String type;
    /**
     * 大类id 1-吊车安全监测 2-防护员电子围栏 3-用电安全 4-汛情防护  5-AI行为告警
     */
    String category;
    /**
     * 告警类型名称
     */
    String text;
    /**
     * 告警触发字段
     */
    String fields;

    public String getCategory() {
        return category;
    }

    public void setCategory(String category) {
        this.category = category;
    }

    public String getType() {
        return type;
    }

    public void setType(String id) {
        this.type = id;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public String getFields() {
        return fields;
    }

    public void setFields(String fields) {
        this.fields = fields;
    }

    RailGiveAlarmTypeConfigEnum(String type, String category,String text, String fields) {
        this.type = type;
        this.category = category;
        this.text = text;
        this.fields = fields;
    }
    public static RailGiveAlarmTypeConfigEnum getEnum(String type){
        RailGiveAlarmTypeConfigEnum[] values = RailGiveAlarmTypeConfigEnum.values();
        for (RailGiveAlarmTypeConfigEnum e:values){
            if (e.getType().equals(type)){
                return e;
            }
        }
        return null;
    }
}
